package com.visceb.backstage.dao;
import com.visceb.backstage.entity.Subject;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface subjectRepository extends JpaRepository<Subject, Long>{
    List<Subject> findAll();
//    @Query("select ")
    Subject findById(int id);
    List<Subject> findAllBySubjectNameLike(String subjectName);
    List<Subject> findAllByAcademy(String academy);
    List<Subject> findAllByAcademyAndGrade(String academy, String grade);
    List<Subject> findAllByAcademyOrGrade(String academy, String grade);
    List<Subject> findAllByGrade(String grade);
    int deleteById(int id);
}
